﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using QDT.Common;
using QDT.Core.Domain;
using QDT.Services.ArticleMoudule;

namespace QDT.Web.Controllers
{
    public class HelpController : BaseController
    {

        public ActionResult Index(int id=0)
        {
            var article = IoC.Resolve<IArticleService>().GetArticleById(id);

            if (article == null || !article.IsEffect)
            {
                return NotFound();
            }

            ViewBag.Title = article.Title;
            ViewBag.Content = article.Content;

            return View(id);
        }

        public ActionResult LoadApp()
        {
            return View();
        }

    }
}
